const { Goods } = require('../../../model/goods');
const { decodeToken } = require('../../../middleGuard/jwt')

module.exports = async (req, res) => {
    console.log('req.params', req.params)
    const { id } = req.params
  const data = await Goods.findOne({_id: id}).populate('category').populate('user', '_id, username nickname avatar')
  res.json({
      data: data
  })
}